<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>我的订单</title>
<link rel="icon" href="${pageContext.request.contextPath}/img/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css" type="text/css" />
<script src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-ui.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery-ui.structure.min.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery-ui.min.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery-ui.theme.min.css" />
<style>
body {
	margin-top: 20px;
	margin: 0 auto;
}

.carousel-inner .item img {
	width: 100%;
	height: 300px;
}
</style>

<script type="text/javascript">
	function confirmOrder(){
		//提交表单
		$("#orderForm").submit();
	}


</script>

</head>

<body>
	<!-- 引入header.jsp -->
	<jsp:include page="header.jsp"></jsp:include>

	<div class="container">
		<div class="row">
			<div style="margin: 0 auto; margin-top: 10px; width: 950px;">
				<strong>订单详情</strong>
				<table class="table table-bordered">
					<tbody>
						<tr class="warning">
							<th colspan="7">订单编号:${order.oid }</th>
						</tr>
						<tr class="warning">
							<th>图片</th>
							<th>房间类型</th>
							<th>价格</th>
							<th>数量</th>
							<th>使用时间</th>
							<th>小计</th>
						</tr>

						<tr class="active">
							<td width="60" width="40%"><img
								src="${pageContext.request.contextPath }/${order.hometype.htimage}"
								width="70" height="60"></td>
							<td width="15%"><a target="_blank">${order.hometype.htname}</a></td>
							<td width="20%">${order.hometype.ht_new_price}</td>
							<td width="10%">${order.onumber}</td>
							<td width="25%">${order.startTime}&nbsp;<br />${order.stopTime}</td>
							<td width="15%"><span class="subtotal">${order.total }</span></td>
						</tr>

					</tbody>
				</table>
			</div>

			<div style="text-align: right; margin-right: 120px;">
				商品金额: <strong style="color: #ff6600;">${order.total } 元</strong>
			</div>

		</div>

		<div>
			<hr />
			<form id="orderForm" class="form-horizontal"
				action="${pageContext.request.contextPath}/pay?method=pay" method="post"
				style="margin-top: 5px; margin-left: 100px;">
				<!-- method的名字 通过表单提交 -->
				<input type="hidden" name="method" value="confirmOrder">
				<!-- 传递订单oid -->
				<input type="hidden" name="oiid" value="${order.oid }">
				<input type="hidden" name="cost" value="${order.total }">
				
				<div class="form-group">
					<label for="uname" class="col-sm-1 control-label">联系人</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" id="uname" style="width: 80%"
							name="uname" placeholder="请输收货人" value="${user.username }">
					</div>
				</div>
				<div class="form-group">
					<label for="uname" class="col-sm-1 control-label">电话</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" id="uphone" style="width: 80%"
							name="uphone" placeholder="请输入联系方式" value="${user.userphone }">
					</div>
				</div>

				<hr/>

				<div style="margin-top: 5px; margin-left: 0px;">
					<strong>选择银行：</strong><br /> 
						<input type="radio" name="payway" value="ICBC-NET-B2C" checked="checked"/>
						工商银行 <img src="./pay_img/icbc.jpg" align="middle" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="payway" value="BOC-NET-B2C" />中国银行 <img
							src="./pay_img/bc.jpg" align="middle" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="payway" value="ABC-NET-B2C" />农业银行 <img
							src="./pay_img/abc.jpg" align="middle"/><br>
						<input type="radio" name="payway" value="BOCO-NET-B2C" /> 交通银行 <img
							src="./pay_img/bcc.jpg" align="middle" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="payway" value="CCB-NET-B2C" />建设银行 <img
							src="./pay_img/ccb.jpg" align="middle" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="payway" value="CMBCHINA-NET-B2C" />招商银行 <img 
							src="./pay_img/cmb.jpg" align="middle" />
					<hr>
					<strong>第三方支付</strong><br/> 
						<input type="radio" name="payway" value="alipay" />
							支付宝支付 <img src="./pay_img/alipay.jpg" align="middle" />
					
					<input type="submit" class="btn btn-success btn-lg" value="立即支付"/>
					
					
				</div>
					<hr>
			</form>

		</div>

	</div>

	<!-- 引入footer.jsp -->
	<jsp:include page="footer.jsp"></jsp:include>

</body>

</html>